<div>
<div class="modal-header">
    <h4 class="modal-title">
        为产品：{{p.name}} 设置 [ {{p.sale_belong_label}} ] 系统的对接参数
    </h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="form-horizontal" ng-repeat="attr in p.attrlist">

    <div class="form-group"  >
        <label class="col-sm-3 col-xs-4 control-label text-right">型号</label>
        <div class="col-sm-4 col-xs-12">
            <p class="form-control-static">{{attr.attr_name}}</p>
        </div>
    </div>


    <!-- 票付通 -->
    <div class="form-group" ng-if="p.sale_belong == 'weshop_piaofutong'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">商品供应商id</label>
        <div class="col-sm-4 col-xs-12">
            <input type="text" class="form-control" 
            ng-model="attr.sysaffirm_target_goods_supply">
        </div>
    </div>
    <div class="form-group" ng-if="p.sale_belong == 'weshop_piaofutong'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">商品景区id</label>
        <div class="col-sm-4 col-xs-12">
            <input type="text" class="form-control" 
            ng-model="attr.sysaffirm_target_goods_view">
        </div>
    </div>
    <div class="form-group" ng-if="p.sale_belong == 'weshop_piaofutong'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
        <div class="col-sm-4 col-xs-12">
            <input type="text" class="form-control" 
            ng-model="attr.sysaffirm_target_goods_code">
        </div>
    </div>
    <!-- 票付通 -->


    <!-- 天时同城 -->
    <div class="form-group" 
    ng-if="p.sale_belong == 'weshop_tstc_al' || p.sale_belong == 'weshop_tstc_bg'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
        <div class="col-sm-4 col-xs-12">
            <input type="text" class="form-control" 
            ng-model="attr.sysaffirm_target_goods_code">
        </div>
    </div>
    <!-- 天时同城 -->


    <!-- 居游 -->
    <div class="form-group" 
    ng-if="p.sale_belong == 'weshop_juyou'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
        <div class="col-sm-4 col-xs-12">
            <input type="text" class="form-control" 
            ng-model="attr.sysaffirm_target_goods_code">
        </div>
    </div>
    <!-- 居游 -->


    <!-- 海洋馆 -->
    <div class="form-group" 
    ng-if="p.sale_belong == 'weshop_royaloc'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">商品id</label>
        <div class="col-sm-4 col-xs-12">
            <input type="text" class="form-control" 
            ng-model="attr.sysaffirm_target_goods_code">
        </div>
    </div>

    <div class="form-group" 
    ng-if="p.sale_belong == 'weshop_royaloc'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">退票类别</label>
        <div class="col-sm-4 col-xs-12">
            <label class="i-checks  checkbox-inline">
              <input type="radio" value="0" name="sysaffirm_target_goods_back_type"
              ng-model="attr.sysaffirm_target_goods_back_type"
              >
              <i></i>
              不限制
            </label>

            <label class="i-checks  checkbox-inline">
              <input type="radio" value="1" name="sysaffirm_target_goods_back_type"
              ng-model="attr.sysaffirm_target_goods_back_type"
              >
              <i></i>
              只能退最大可用数量
            </label>
        </div>
    </div>


    <div class="form-group" 
    ng-if="p.sale_belong == 'weshop_royaloc'" >
        <label class="col-sm-3 col-xs-4 control-label text-right">成人/儿童</label>
        <div class="col-sm-4 col-xs-12">
            <label class="i-checks  checkbox-inline">
              <input type="radio" value="0" name="sysaffirm_target_goods_child_flag"
              ng-model="attr.sysaffirm_target_goods_child_flag"
              >
              <i></i>
              成人
            </label>

            <label class="i-checks  checkbox-inline">
              <input type="radio" value="1" name="sysaffirm_target_goods_child_flag"
              ng-model="attr.sysaffirm_target_goods_child_flag"
              >
              <i></i>
              儿童
            </label>
        </div>
    </div>


    <!-- 海洋馆 -->




    <div class="form-group"  >
        <label class="col-sm-3 col-xs-4 control-label text-right"> </label>
        <div class="col-sm-4 col-xs-12">
            <button type="button" class="btn btn-primary btn-block"
            ng-click="save(attr)"
            >确定</button>
        </div>
    </div>
   <!--  <table class="table table-condensed table-hover table-bordered mt10">
        <thead>
            <tr>
                <th class="col-md-2 text-center">体系名称</th>
                <th class="col-md-8 text-center">佣金</th>
                <th class="col-md-2 text-center">允许分销</th>
            </tr>
        </thead>
        <tbody> -->
            <!-- <tr ng-repeat="obj in attr.levelarr">
                <td class="">
                    {{obj.title}}
                </td>
                <td class="text-center">
                    <div class="form-group">
                      
                      <div class="col-sm-10">
                        <p class="col-sm-2">一级:</p><input class="col-sm-4" type="text" class="form-control" ng-model="obj.profit" placeholder="一级">
                        <p class="col-sm-2">二级:</p><input class="col-sm-4" type="text" class="form-control" ng-model="obj.profit1" placeholder="二级">
                      </div>
                      <div class="col-sm-2 ">
                        <button class="btn btn-info btn-sm btn-block" ng-click="save(attr.attr_id, obj)">保存</button>
                      </div>
                    </div>
                </td>
                <td class="text-center">
                    
                    <a ng-click="opt(attr.attr_id, obj)" >
                        <span 
                        ng-if="obj.state == 1"
                        class="glyphicon glyphicon-ok text-success" aria-hidden="true"></span>

                        <span
                        ng-if="obj.state == 0"
                        class="glyphicon glyphicon-remove text-danger" aria-hidden="true"></span>
                    </a>


                </td>
                
            </tr> -->
 <!--        </tbody>
    </table> -->

    </div>
        
</div>

</div>
<!-- <div class="modal-footer">
    <button class="btn btn-warning" type="button" ng-click="cancel()">返回</button>
</div> -->
</div>